package com.cuit.washneedshake.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.cuit.washneedshake.model.entity.ImportedProvinces;
import com.cuit.washneedshake.service.ImportedProvincesService;
import com.cuit.washneedshake.mapper.ImportedProvincesMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;


@Service
public class ImportedProvincesServiceImpl extends ServiceImpl<ImportedProvincesMapper, ImportedProvinces>
    implements ImportedProvincesService {
    @Autowired
    private ImportedProvincesMapper importedProvincesMapper;
    public HashMap<String ,ImportedProvinces> getImportedProvincesData(){
        HashMap<String,ImportedProvinces> map =new HashMap<>();
        List<ImportedProvinces> importData = importedProvincesMapper.getImportedProvincesData();
        for(ImportedProvinces o : importData){
            map.put(o.getId().toString(),o);
        }
        return map;

    }

}




